package com.wjh.kt_vod.controller;

import com.wjh.kt_vod.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;

/**
 * Wang_Junhong
 * 2022/7/15
 * 文件描述：
 */
@Api(tags = "测试")
@RestController
@RequestMapping("/admin/vod/test")
public class TestController {

    @PostMapping("testFile")
    @ApiOperation("文件路径测试")
    public Result testMutil(MultipartFile multipartFile) throws IOException {;
        File file = new File(multipartFile.getOriginalFilename());
        String s = file.getAbsolutePath();
        return Result.ok(s);
    }


}
